<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
  <title>采集器</title>
  <link rel="stylesheet" href="css/style.css">
  <link rel="icon" href="./img/favicon.ico">
</head>

<body>
  <div class="home-base">
    <div class="header-base flex flex-jcb">
        <!-- <img class="header-logo" src="./img/logoBlack.png"> -->
        <div class="header-menu" onclick="menuClick(this)">
        </div>
    </div>
    <div class="content-base flex">
      <div class="left-base" id="leftMenu">
<!--        <div class="left-title">系统菜单</div>-->
        <ul>
          <li>
            <a href="index.html" id="idLeftMenuHome" class="">系统状态</a>
          </li>
          <li>
              <a href="network.html" id="idLeftMenuNetwork" class="">网络接口</a>
          </li>
          <li>
              <a href="wlan.html" id="idLeftMenuWLAN" class="">Wi-Fi设置</a>
          </li>
        <!--                <li>-->
        <!--                    <a href="">流量统计</a>-->
        <!--                </li>-->
          <li>
            <a href="device.html" id="idLeftMenuDevice" class="">网关功能</a>
          </li>
          <li>
              <a href="ota.html" id="idLeftMenuOTA" class="">固件更新</a>
          </li>
        </ul>
      </div>
      <div class="right-base">
        <div class="page-header">
          <span class="header-title-one" onclick="selectTitle(this),selectContent('netifSelectedShow'),getDefNetif()">上网接口</span>
          <span> | </span>
          <span class="header-title-one" onclick="selectTitle(this),selectContent('netifETHShow')">Ethernet</span>
          <span> | </span>
          <span class="header-title-one" onclick="selectTitle(this),selectContent('netifSTAShow')">Wi-Fi STA</span>
          <span> | </span>
          <span class="header-title-one" onclick="selectTitle(this),selectContent('netifAPShow')">Wi-Fi AP</span>
          <span> | </span>
          <span class="header-title-one" onclick="selectTitle(this),selectContent('netifLTEShow')">LTE Cat-M1</span>
        </div>

        <div class="page-content" id="netifSelectedShow">
          <div class="page-title">上网接口选择</div>
          <div class="page-detail">
            <div class="line-base">
              <span class="title">上网接口</span>
              <select id="default-netif-select">
                <option value="ETH_WAN">Ethernet</option>
                <option value="WIFI_STA_DEF">Wi-Fi STA</option>
                <option value="PPP_DEF">LTE Cat-M1</option>
              </select>
            </div>
            <div class="line-base-btn">
                <button onclick="setDefaultNetif()" class="">
                    保存
                </button>
            </div>

          </div>
        </div>

        <div class="page-content" id="netifETHShow">
          <div class="page-title">IP设置</div>
          <div class="page-detail">

            <div class="line-base">
              <span class="title">IP获取方式</span>
              <select id="eth-ip-mode">
                <option value="0">DHCP</option>
                <option value="1">静态IP</option>
              </select>
            </div>
            <div class="line-base">
                <span class="title">IP地址</span>
                <input id="static-ip" maxlength="32" type="text" placeholder="请输入静态IP地址" />
            </div>
            <div class="line-base">
                <span class="title">子网掩码</span>
                <input id="static-netmask" maxlength="32" type="text" placeholder="子网掩码" />
            </div>
            <div class="line-base">
                <span class="title">网关IP</span>
                <input id="static-gw" maxlength="32" type="text" placeholder="网关IP" />
            </div>

            <div class="line-base-btn">
                <button id="save-static-ip-config" onclick="postNetifIpInfoData()" class="">
                    保存
                </button>
                <span>保存后请转到新的IP地址访问</span>
            </div>

          </div>
        </div>

        <div class="page-content" id="netifSTAShow">
          <div class="page-title">IP设置</div>
          <div class="page-detail">

            <div class="line-base">
              <span class="title">IP获取方式</span>
              <select id="sta-ip-mode">
                <option value="0">DHCP</option>
                <option value="1">静态IP</option>
              </select>
            </div>

            <div class="line-base">
                <span class="title">IP地址</span>
                <input id="sta-static-ip" maxlength="32" type="text" placeholder="请输入静态IP地址" />
            </div>
            <div class="line-base">
                <span class="title">子网掩码</span>
                <input id="sta-static-netmask" maxlength="32" type="text" placeholder="子网掩码" />
            </div>
            <div class="line-base">
                <span class="title">网关IP</span>
                <input id="sta-static-gw" maxlength="32" type="text" placeholder="网关IP" />
            </div>

            <div class="line-base-btn">
                <button onclick="postNetifStaIpInfoData()" class="">
                    保存
                </button>
                <span>保存后请转到新的IP地址访问</span>
            </div>

          </div>
        </div>

        <div class="page-content" id="netifAPShow">
          <div class="page-title">IP设置</div>
          <div class="page-detail">

            <div class="line-base">
              <span class="title">DHCP服务</span>
              <select id="ap-ip-mode">
                <option value="0">禁用DHCP服务</option>
                <option value="1">启用DHCP服务</option>
              </select>
            </div>

            <div class="line-base">
                <span class="title">IP地址</span>
                <input id="ap-static-ip" maxlength="32" type="text" placeholder="请输入设备IP地址" />
            </div>
            <div class="line-base">
                <span class="title">子网掩码</span>
                <input id="ap-static-netmask" maxlength="32" type="text" placeholder="子网掩码" />
            </div>
            <div class="line-base">
                <span class="title">网关IP</span>
                <input id="ap-static-gw" maxlength="32" type="text" placeholder="网关IP" />
            </div>

            <div class="line-base-btn">
                <button onclick="postNetifApIpInfoData()" class="">
                    保存
                </button>
            </div>

          </div>
        </div>

        <div class="page-content" id="netifLTEShow">
          <div class="page-title">参数设置</div>
          <div class="page-detail">
            <div class="line-base">
              <span class="title">APN名称</span>
              <input id="apn-name" maxlength="32" type="text" placeholder="请输入APN名称" />
            </div>
            <div class="line-base-btn">
                <button onclick="setDefaultNetif()" class="">
                    保存
                </button>
            </div>

          </div>
        </div>
        
      </div>
    </div>
  </div>
  <script src="js/common.js"></script>
  <script src="js/network.js"></script>
  <script>
    initHash();
    window.addEventListener('hashchange', function() {
      initHash();
    })
  </script>
</body>

</html>
